import {PipeTransform, Type} from '@angular/core';
import {DatePipe} from '@angular/common';

export const pipeTypes: { [key: string]: PipeTransform } = {
  date: new DatePipe('zh-Hans'),

};

export function GnPipe(key: string, params: any[] = []) {
  return (target: Type<PipeTransform>) => {
    pipeTypes[key] = Reflect.construct(target, params);
  };
}
